import request from '@/utils/request'

//查询chapter
export function getchapter(courseId) {
  return request({
    url: `/edu/chapter/getChapterVideoVo/${courseId}`,
    method: 'get'
  })
}

//添查询chapter 根据chapterId
export function getchapterByChapterId(chapterId) {
  return request({
    url: `/edu/chapter/getchapter/${chapterId}`,
    method: 'get'
  })
}

//添加课程章节
export function addchapter(chapter) {
  return request({
    url: `/edu/chapter/addChapter`,
    method: 'post',
    data: chapter
  })
}

//修改课程章节
export function editchapter(chapter) {
  return request({
    url: `/edu/chapter/editChapter`,
    method: 'put',
    data: chapter
  })
}

//删除课程章节
export function delchapter(chapterId) {
  return request({
    url: `/edu/chapter/delChapter/${chapterId}`,
    method: 'delete'
  })
}
